#include<stdio.h>
int main(){

char c[11]={'(','3',')','*','2','/','(','-1',')'};int a[11]={0,8,0,0,-4,0,0,2,0};int n=11;
    int p,j,i;
    for(p=1;p<n;p++){
        
        printf("#%d#",p);        for(i=0;i<n;i++){
        if(c[i]>='0'&&c[i]<='9') printf("|%d|",a[i]);
        else printf("%c",c[i]);
    }   printf("\n");

        if ((c[p]-'0'>=0)&&(c[p]-'9'<=0)&&(c[p-1]-'('==0)&&(c[p+1]-')'==0)){
            a[p-1]=a[p];
            c[p-1]=c[p];
        for(j=p;j<n;j++) {c[j]=c[j+2];a[j]=a[j+2];}}
        
        printf("#%d#",p);        for(int i=0;i<n;i++){
        if(c[i]>='0'&&c[i]<='9') printf("|%d|",a[i]);
        else printf("%c",c[i]);
    }   printf("\n");
        printf("|%d  %d|\n",y,y1);
        
                    for(int i=0;i<n;i++){
        if(c[i]>='0'&&c[i]<='9') printf("|%d|",a[i]);
        else printf("%c",c[i]);}
        for(int i=0;i<n;i++) printf("%2d",a[i]);printf("\n");
        for(int i=0;i<n;i++) printf("%2c",c[i]);printf("\n");



}   return 0;}